<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/facelets/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"                 
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:param name="title" value="#{msg.startTitle}"/>
<ui:define name="headerBar">
    <ui:include src="WEB-INF/facelets/headerBar.xhtml"/>
</ui:define>

<ui:define name="pageContents">
    <h:form>
        <h:panelGrid columns="2">

            <h:outputLabel value="#{msg.ageLabel}"/>
            <h:panelGroup>                                
                <h:selectOneMenu id="minAge" value="#{searchControllerBean.criteria.pcMinAge}">                    
                    <c:forEach var="i" begin="18" end="100">
                        <f:selectItem itemValue="#{i}"/>
                    </c:forEach>
                </h:selectOneMenu>
                <h:outputLabel value="#{msg.to}" />
                <h:selectOneMenu id="maxAge" value="#{searchControllerBean.criteria.pcMaxAge}">                    
                    <c:forEach var="i" begin="18" end="100">
                        <f:selectItem itemValue="#{i}"/>
                    </c:forEach>
                </h:selectOneMenu>  
            </h:panelGroup>
            <h:outputLabel value="#{msg.dateProfileLabelHeight}"/>
            <h:panelGroup>           
                <h:selectOneMenu id="minHeight" value="#{searchControllerBean.criteria.pcMinHeight}">                    
                    <c:forEach var="i" begin="0" end="60">
                        <f:selectItem itemValue="#{i + 150}"/>
                    </c:forEach>
                </h:selectOneMenu>
                <h:outputLabel value="#{msg.to}" />
                <h:selectOneMenu id="maxHeight" value="#{searchControllerBean.criteria.pcMaxHeight}">                    
                    <c:forEach var="i" begin="0" end="60">
                        <f:selectItem itemValue="#{i + 150}"/>
                    </c:forEach>
                </h:selectOneMenu>  
            </h:panelGroup>
            <h:outputLabel value="#{msg.tobaccoLabel}" />
            <h:selectOneMenu id="tobacco" value="#{searchControllerBean.criteria.pcTobaccoUser}" >
                <f:selectItem itemLabel="#{msg.yes}" itemValue="true"/>
                <f:selectItem itemLabel="#{msg.no}" itemValue="false"/>
            </h:selectOneMenu>
            <h:outputLabel value="#{msg.childrenLabel}" />
            <h:selectOneMenu id="children" value="#{searchControllerBean.criteria.pcChildren}" >
                <f:selectItem itemLabel="#{msg.yes}" itemValue="true"/>
                <f:selectItem itemLabel="#{msg.no}" itemValue="false"/>
            </h:selectOneMenu>
            <h:commandButton value="#{msg.search}" action="#{searchControllerBean.search}"/>
        </h:panelGrid>                         
    </h:form>
</ui:define>

<ui:param name="h1" value="#{msg.searchHeader}"/>

</ui:composition>